// store/index.js

import { createStore } from "vuex";

const globalStore = {
  state: {
    token: "", // 用户凭证 Token
    indexNav: 0, // 菜单栏索引
  },
  mutations: {
    //统一设置state
    SET_STATE(state, data) {
      Object.assign(state, data);
    },
  },
  actions: {},
  getters: {
    teamConfig: (state) => state.teamConfig,
  },
};

export default createStore({
  modules: {
    layout: require("./modules/layout.js"),
  },
  ...globalStore,
});
